package com.ruoyi.ies.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ies.mapper.GarbageStationMapper;
import com.ruoyi.ies.domain.GarbageStation;
import com.ruoyi.ies.service.IGarbageStationService;

/**
 * 垃圾站Service业务层处理
 *
 * @author July
 * @date 2023-06-15
 */
@Service
public class GarbageStationServiceImpl implements IGarbageStationService
{
    @Autowired
    private GarbageStationMapper garbageStationMapper;

    /**
     * 查询垃圾站
     *
     * @param gId 垃圾站主键
     * @return 垃圾站
     */
    @Override
    public GarbageStation selectGarbageStationByGId(Long gId)
    {
        return garbageStationMapper.selectGarbageStationByGId(gId);
    }

    /**
     * 查询垃圾站列表
     *
     * @param garbageStation 垃圾站
     * @return 垃圾站
     */
    @Override
    public List<GarbageStation> selectGarbageStationList(GarbageStation garbageStation)
    {
        return garbageStationMapper.selectGarbageStationList(garbageStation);
    }

    /**
     * 新增垃圾站
     *
     * @param garbageStation 垃圾站
     * @return 结果
     */
    @Override
    public int insertGarbageStation(GarbageStation garbageStation)
    {
        return garbageStationMapper.insertGarbageStation(garbageStation);
    }

    /**
     * 修改垃圾站
     *
     * @param garbageStation 垃圾站
     * @return 结果
     */
    @Override
    public int updateGarbageStation(GarbageStation garbageStation)
    {
        return garbageStationMapper.updateGarbageStation(garbageStation);
    }

    /**
     * 批量删除垃圾站
     *
     * @param gIds 需要删除的垃圾站主键
     * @return 结果
     */
    @Override
    public int deleteGarbageStationByGIds(Long[] gIds)
    {
        return garbageStationMapper.deleteGarbageStationByGIds(gIds);
    }

    /**
     * 删除垃圾站信息
     *
     * @param gId 垃圾站主键
     * @return 结果
     */
    @Override
    public int deleteGarbageStationByGId(Long gId)
    {
        return garbageStationMapper.deleteGarbageStationByGId(gId);
    }
}
